home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 June / SGI Freeware 1998 June.iso / dist / fw_unzip.idb / usr / freeware / catman / u_man / cat1 / unzip.Z / unzip
Text File  |  1998-05-21  |  42KB  |  925 lines

  1.  
  2.  
  3.  
  4.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       unzip    - list,    test and extract compressed files in a ZIP
  10.       archive
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       uuuunnnnzzzziiiipppp    [----ZZZZ] [----ccccffffllllppppttttuuuuvvvvzzzz[aaaabbbbjjjjnnnnooooqqqqssssCCCCLLLLMMMMVVVVXXXX$$$$]]    _f_i_l_e[._z_i_p]
  14.       [_f_i_l_e(_s) ...]     [----xxxx _x_f_i_l_e(_s) ...] [----dddd _e_x_d_i_r]
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.       _u_n_z_i_p    will list, test, or extract files from a ZIP archive,
  18.       commonly found on MS-DOS systems.  The default behavior
  19.       (with    no options) is to extract into the current directory
  20.       (and subdirectories below it)    all files from the specified
  21.       ZIP archive.    A companion program, _z_i_p(1L), creates ZIP
  22.       archives; both programs are compatible with archives created
  23.       by PKWARE's _P_K_Z_I_P and    _P_K_U_N_Z_I_P    for MS-DOS, but    in many    cases
  24.       the program options or default behaviors differ.
  25.  
  26.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  27.       _f_i_l_e[._z_i_p]
  28.            Path of the ZIP archive(s).  If the file    specification
  29.            is a wildcard, each matching file is processed in an
  30.            order determined    by the operating system    (or file
  31.            system).     Only the filename can be a wildcard; the path
  32.            itself cannot.  Wildcard    expressions are    similar    to
  33.            Unix _e_g_r_e_p(1) (regular) expressions and may contain:
  34.  
  35.            *    matches a sequence of 0 or more characters
  36.  
  37.            ?    matches exactly 1 character
  38.  
  39.            [...]
  40.             matches any    single character found inside the
  41.             brackets; ranges are specified by a    beginning
  42.             character, a hyphen, and an    ending character.  If
  43.             an exclamation point or a caret (`!' or `^')
  44.             follows the    left bracket, then the range of
  45.             characters within the brackets is complemented
  46.             (that is, anything _e_x_c_e_p_t the characters inside
  47.             the    brackets is considered a match).
  48.  
  49.            (Be sure    to quote any character that might otherwise be
  50.            interpreted or modified by the operating    system,
  51.            particularly under Unix and VMS.)  If no    matches    are
  52.            found, the specification    is assumed to be a literal
  53.            filename; and if    that also fails, the suffix .zip is
  54.            appended.  Note that self-extracting ZIP    files are
  55.            supported, as with any other ZIP    archive; just specify
  56.            the .exe    suffix (if any)    explicitly.
  57.  
  58.       [_f_i_l_e(_s)]
  59.            An optional list    of archive members to be processed,
  60.  
  61.  
  62.  
  63.      Page 1                          (printed 5/6/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  71.  
  72.  
  73.  
  74.            separated by spaces.  (VMS versions compiled with
  75.            VMSCLI defined must delimit files with commas instead.
  76.            See ----vvvv in OOOOPPPPTTTTIIIIOOOONNNNSSSS below.)  Regular expressions
  77.            (wildcards) may be used to match    multiple members; see
  78.            above.  Again, be sure to quote expressions that    would
  79.            otherwise be expanded or    modified by the    operating
  80.            system.
  81.  
  82.       [----xxxx _x_f_i_l_e(_s)]
  83.            An optional list    of archive members to be excluded from
  84.            processing.  Since wildcard characters match directory
  85.            separators (`/'), this option may be used to exclude
  86.            any files that are in subdirectories.  For example,
  87.            ``unzip foo *.[ch] -x */*'' would extract all C source
  88.            files in    the main directory, but    none in    any
  89.            subdirectories.    Without    the ----xxxx option, all C source
  90.            files in    all directories    within the zipfile would be
  91.            extracted.
  92.  
  93.       [----dddd _e_x_d_i_r]
  94.            An optional directory to    which to extract files.     By
  95.            default,    all files and subdirectories are recreated in
  96.            the current directory; the ----dddd option allows extraction
  97.            in an arbitrary directory (always assuming one has
  98.            permission to write to the directory).  This option
  99.            need not    appear at the end of the command line; it is
  100.            also accepted before the    zipfile    specification (with
  101.            the normal options), immediately    after the zipfile
  102.            specification, or between the _f_i_l_e(_s) and the ----xxxx
  103.            option.    The option and directory may be    concatenated
  104.            without any white space between them, but note that
  105.            this may    cause normal shell behavior to be suppressed.
  106.            In particular, ``-d ~'' (tilde) is expanded by Unix C
  107.            shells into the name of the user's home directory, but
  108.            ``-d~'' is treated as a literal subdirectory ``~~~~'' of
  109.            the current directory.
  110.  
  111.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  112.       Note that, in    order to support obsolescent hardware, _u_n_z_i_p's
  113.       usage    screen is limited to 22    or 23 lines and    should
  114.       therefore be considered only a reminder of the basic _u_n_z_i_p
  115.       syntax rather    than an    exhaustive list    of all possible    flags.
  116.       The exhaustive list follows:
  117.  
  118.       ----ZZZZ   _z_i_p_i_n_f_o(1L) mode.  If the first option on the command
  119.            line is ----ZZZZ, the remaining options are taken to be
  120.            _z_i_p_i_n_f_o(1L) options.  See the appropriate manual    page
  121.            for a description of these options.
  122.  
  123.       ----AAAA   [OS/2, Unix DLL]    print extended help for    the DLL's
  124.            programming interface (API).
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                          (printed 5/6/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  137.  
  138.  
  139.  
  140.       ----cccc   extract files to    stdout/screen (``CRT'').  This option
  141.            is similar to the ----pppp option except that the name    of
  142.            each file is printed as it is extracted,    the ----aaaa option
  143.            is allowed, and ASCII-EBCDIC conversion is
  144.            automatically performed if appropriate.    This option is
  145.            not listed in the _u_n_z_i_p usage screen.
  146.  
  147.       ----ffff   freshen existing    files, i.e., extract only those    files
  148.            that already exist on disk and that are newer than the
  149.            disk copies.  By    default    _u_n_z_i_p queries before
  150.            overwriting, but    the ----oooo option may be used to suppress
  151.            the queries.  Note that under many operating systems,
  152.            the TZ (timezone) environment variable must be set
  153.            correctly in order for ----ffff and ----uuuu    to work    properly
  154.            (under Unix the variable    is usually set automatically).
  155.            The reasons for this are    somewhat subtle    but have to do
  156.            with the    differences between DOS-format file times
  157.            (always local time) and Unix-format times (always in
  158.            GMT/UTC)    and the    necessity to compare the two.  A
  159.            typical TZ value    is ``PST8PDT'' (US Pacific time    with
  160.            automatic adjustment for    Daylight Savings Time or
  161.            ``summer    time'').
  162.  
  163.       ----llll   list archive files (short format).  The names,
  164.            uncompressed file sizes and modification    dates and
  165.            times of    the specified files are    printed, along with
  166.            totals for all files specified.    If UnZip was compiled
  167.            with OS2_EAS defined, the ----llll option also    lists columns
  168.            for the sizes of    stored OS/2 extended attributes    (EAs)
  169.            and OS/2    access control lists (ACLs).  In addition, the
  170.            zipfile comment and individual file comments (if    any)
  171.            are displayed.  If a file was archived from a single-
  172.            case file system    (for example, the old MS-DOS FAT file
  173.            system) and the ----LLLL option was given, the    filename is
  174.            converted to lowercase and is prefixed with a caret
  175.            (^).
  176.  
  177.       ----pppp   extract files to    pipe (stdout).    Nothing    but the    file
  178.            data is sent to stdout, and the files are always
  179.            extracted in binary format, just    as they    are stored (no
  180.            conversions).
  181.  
  182.       ----tttt   test archive files.  This option    extracts each
  183.            specified file in memory    and compares the CRC (cyclic
  184.            redundancy check, an enhanced checksum) of the expanded
  185.            file with the original file's stored CRC    value.
  186.  
  187.       ----TTTT   [most OSes] set the timestamp on    the archive(s) to that
  188.            of the newest file in each one.    This corresponds to
  189.            _z_i_p's ----ggggoooo option    except that it can be used on wildcard
  190.            zipfiles    (e.g., ``unzip -T \*.zip'') and    is much
  191.            faster.
  192.  
  193.  
  194.  
  195.      Page 3                          (printed 5/6/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  203.  
  204.  
  205.  
  206.       ----uuuu   update existing files and create    new ones if needed.
  207.            This option performs the    same function as the ----ffff
  208.            option, extracting (with    query) files that are newer
  209.            than those with the same    name on    disk, and in addition
  210.            it extracts those files that do not already exist on
  211.            disk.  See ----ffff above for information on setting the
  212.            timezone    properly.
  213.  
  214.       ----vvvv   be verbose or print diagnostic version info.  This
  215.            option has evolved and now behaves as both an option
  216.            and a modifier.    As an option it    has two    purposes:
  217.            when a zipfile is specified with    no other options, ----vvvv
  218.            lists archive files verbosely, adding to    the basic ----llll
  219.            info the    compression method, compressed size,
  220.            compression ratio and 32-bit CRC.  When no zipfile is
  221.            specified (that is, the complete    command    is simply
  222.            ``unzip -v''), a    diagnostic screen is printed.  In
  223.            addition    to the normal header with release date and
  224.            version,    _u_n_z_i_p lists the    home Info-ZIP ftp site and
  225.            where to    find a list of other ftp and non-ftp sites;
  226.            the target operating system for which it    was compiled,
  227.            as well as (possibly) the hardware on which it was
  228.            compiled, the compiler and version used,    and the
  229.            compilation date; any special compilation options that
  230.            might affect the    program's operation (see also
  231.            DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN below); and any options stored in
  232.            environment variables that might    do the same (see
  233.            EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT OOOOPPPPTTTTIIIIOOOONNNNSSSS below).  As a modifier it works in
  234.            conjunction with    other options (e.g., ----tttt) to produce
  235.            more verbose or debugging output; this is not yet fully
  236.            implemented but will be in future releases.
  237.  
  238.       ----zzzz   display only the    archive    comment.
  239.  
  240.      MMMMOOOODDDDIIIIFFFFIIIIEEEERRRRSSSS
  241.       ----aaaa   convert text files.  Ordinarily all files are extracted
  242.            exactly as they are stored (as ``binary'' files).  The
  243.            ----aaaa option causes    files identified by _z_i_p    as text    files
  244.            (those with the `t' label in _z_i_p_i_n_f_o listings, rather
  245.            than `b') to be automatically extracted as such,
  246.            converting line endings,    end-of-file characters and the
  247.            character set itself as necessary.  (For    example, Unix
  248.            files use line feeds (LFs) for end-of-line (EOL)    and
  249.            have no end-of-file (EOF) marker; Macintoshes use
  250.            carriage    returns    (CRs) for EOLs;    and most PC operating
  251.            systems use CR+LF for EOLs and control-Z    for EOF.  In
  252.            addition, IBM mainframes    and the    Michigan Terminal
  253.            System use EBCDIC rather    than the more common ASCII
  254.            character set, and NT supports Unicode.)     Note that
  255.            _z_i_p's identification of text files is by    no means
  256.            perfect;    some ``text'' files may    actually be binary and
  257.            vice versa.  _u_n_z_i_p therefore prints ``[text]'' or
  258.  
  259.  
  260.  
  261.      Page 4                          (printed 5/6/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  269.  
  270.  
  271.  
  272.            ``[binary]'' as a visual    check for each file it
  273.            extracts    when using the ----aaaa option.  The ----aaaaaaaa option
  274.            forces all files    to be extracted    as text, regardless of
  275.            the supposed file type.
  276.  
  277.       ----bbbb   [non-VMS] treat all files as binary (no text
  278.            conversions).  This is a    shortcut for ------------aaaa.
  279.  
  280.       ----bbbb   [VMS] auto-convert binary files (see ----aaaa above) to
  281.            fixed-length, 512-byte record format.  Doubling the
  282.            option (----bbbbbbbb) forces all files to    be extracted in    this
  283.            format.
  284.  
  285.       ----BBBB   [Unix only, and only if compiled    with UNIXBACKUP
  286.            defined]    save a backup copy of each overwritten file
  287.            with a tilde appended (e.g., the    old copy of ``foo'' is
  288.            renamed to ``foo~'').  This is similar to the default
  289.            behavior    of _e_m_a_c_s(1) in many locations.
  290.  
  291.       ----CCCC   match filenames case-insensitively.  _u_n_z_i_p's philosophy
  292.            is ``you    get what you ask for'' (this is    also
  293.            responsible for the ----LLLL/----UUUU change; see the relevant
  294.            options below).    Because    some file systems are fully
  295.            case-sensitive (notably those under the Unix operating
  296.            system) and because both    ZIP archives and _u_n_z_i_p itself
  297.            are portable across platforms, _u_n_z_i_p's default behavior
  298.            is to match both    wildcard and literal filenames case-
  299.            sensitively.  That is, specifying ``makefile'' on the
  300.            command line will _o_n_l_y match ``makefile'' in the
  301.            archive,    not ``Makefile'' or ``MAKEFILE'' (and
  302.            similarly for wildcard specifications).    Since this
  303.            does not    correspond to the behavior of many other
  304.            operating/file systems (for example, OS/2 HPFS, which
  305.            preserves mixed case but    is not sensitive to it), the
  306.            ----CCCC option may be    used to    force all filename matches to
  307.            be case-insensitive.  In    the example above, all three
  308.            files would then    match ``makefile'' (or ``make*'', or
  309.            similar).  The ----CCCC option    affects    files in both the
  310.            normal file list    and the    excluded-file list (xlist).
  311.  
  312.       ----jjjj   junk paths.  The    archive's directory structure is not
  313.            recreated; all files are    deposited in the extraction
  314.            directory (by default, the current one).
  315.  
  316.       ----LLLL   convert to lowercase any    filename originating on    an
  317.            uppercase-only operating    system or file system.    (This
  318.            was _u_n_z_i_p's default behavior in releases    prior to 5.11;
  319.            the new default behavior    is identical to    the old
  320.            behavior    with the ----UUUU option, which is now obsolete and
  321.            will be removed in a future release.)  Depending    on the
  322.            archiver, files archived    under single-case file systems
  323.            (VMS, old MS-DOS    FAT, etc.) may be stored as all-
  324.  
  325.  
  326.  
  327.      Page 5                          (printed 5/6/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  335.  
  336.  
  337.  
  338.            uppercase names;    this can be ugly or inconvenient when
  339.            extracting to a case-preserving file system such    as
  340.            OS/2 HPFS or a case-sensitive one such as under Unix.
  341.            By default _u_n_z_i_p    lists and extracts such    filenames
  342.            exactly as they're stored (excepting truncation,
  343.            conversion of unsupported characters, etc.); this
  344.            option causes the names of all files from certain
  345.            systems to be converted to lowercase.
  346.  
  347.       ----MMMM   pipe all    output through an internal pager similar to
  348.            the Unix_m_o_r_e(1) command.     At the    end of a screenful of
  349.            output, _u_n_z_i_p pauses with a ``--More--''    prompt;    the
  350.            next screenful may be viewed by pressing    the Enter
  351.            (Return)    key or the space bar.  _u_n_z_i_p can be terminated
  352.            by pressing the ``q'' key and, on some systems, the
  353.            Enter/Return key.  Unlike Unix _m_o_r_e(1), there is    no
  354.            forward-searching or editing capability.     Also, _u_n_z_i_p
  355.            doesn't notice if long lines wrap at the    edge of    the
  356.            screen, effectively resulting in    the printing of    two or
  357.            more lines and the likelihood that some text will
  358.            scroll off the top of the screen    before being viewed.
  359.            On some systems the number of available lines on    the
  360.            screen is not detected, in which    case _u_n_z_i_p assumes the
  361.            height is 24 lines.
  362.  
  363.       ----nnnn   never overwrite existing    files.    If a file already
  364.            exists, skip the    extraction of that file    without
  365.            prompting.  By default _u_n_z_i_p queries before extracting
  366.            any file    that already exists; the user may choose to
  367.            overwrite only the current file,    overwrite all files,
  368.            skip extraction of the current file, skip extraction of
  369.            all existing files, or rename the current file.
  370.  
  371.       ----NNNN   [Amiga] extract file comments as    Amiga filenotes.  File
  372.            comments    are created with the -c    option of _z_i_p(1L), or
  373.            with the    -N option of the Amiga port of _z_i_p(1L),    which
  374.            stores filenotes    as comments.
  375.  
  376.       ----oooo   overwrite existing files    without    prompting.  This is a
  377.            dangerous option, so use    it with    care.  (It is often
  378.            used with ----ffff, however, and is the only way to overwrite
  379.            directory EAs under OS/2.)
  380.  
  381.       _u_n_z_i_p's default behavior may be modified via options placed
  382.       in an    environment variable.  This can    be done    with any
  383.       option, but it is probably most useful with the ----aaaa, ----LLLL, ----CCCC,
  384.       ----qqqq, ----oooo, or ----nnnn    modifiers:  make _u_n_z_i_p auto-convert text files
  385.       by default, make it convert filenames    from uppercase systems
  386.       to lowercase,    make it    match names case-insensitively,    make
  387.       it quieter, or make it always    overwrite or never overwrite
  388.       files    as it extracts them.  For example, to make _u_n_z_i_p act
  389.       as quietly as    possible, only reporting errors, one would use
  390.  
  391.  
  392.  
  393.      Page 6                          (printed 5/6/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  401.  
  402.  
  403.  
  404.       one of the following commands:
  405.  
  406.           UNZIP=-qq; export    UNZIP     Unix Bourne shell
  407.           setenv UNZIP -qq         Unix C    shell
  408.           set UNZIP=-qq         OS/2 or MS-DOS
  409.           define UNZIP_OPTS    "-qq"     VMS (quotes for _l_o_w_e_r_c_a_s_e)
  410.  
  411.       Environment options are, in effect, considered to be just
  412.       like any other command-line options, except that they    are
  413.       effectively the first    options    on the command line.  To
  414.       override an environment option, one may use the ``minus
  415.       operator'' to    remove it.  For    instance, to override one of
  416.       the quiet-flags in the example above,    use the    command
  417.  
  418.           unzip --q[_o_t_h_e_r _o_p_t_i_o_n_s] _z_i_p_f_i_l_e
  419.  
  420.       The first hyphen is the normal switch    character, and the
  421.       second is a minus sign, acting on the    q option.  Thus    the
  422.       effect here is to cancel one quantum of quietness.  To
  423.       cancel both quiet flags, two (or more) minuses may be    used:
  424.  
  425.           unzip -t--q zipfile
  426.           unzip ---qt zipfile
  427.  
  428.       (the two are equivalent).  This may seem awkward or
  429.       confusing, but it is reasonably intuitive:  just ignore the
  430.       first    hyphen and go from there.  It is also consistent with
  431.       the behavior of Unix _n_i_c_e(1).
  432.  
  433.       As suggested by the examples above, the default variable
  434.       names    are UNZIP_OPTS for VMS (where the symbol used to
  435.       install _u_n_z_i_p    as a foreign command would otherwise be
  436.       confused with    the environment    variable), and UNZIP for all
  437.       other    operating systems.  For    compatibility with _z_i_p(1L),
  438.       UNZIPOPT is also accepted (don't ask).  If both UNZIP    and
  439.       UNZIPOPT are defined,    however, UNZIP takes precedence.
  440.       _u_n_z_i_p's diagnostic option (----vvvv    with no    zipfile    name) can be
  441.       used to check    the values of all four possible    _u_n_z_i_p and
  442.       _z_i_p_i_n_f_o environment variables.
  443.  
  444.       The timezone variable    (TZ) should be set according to    the
  445.       local    timezone in order for the ----ffff and ----uuuu to operate
  446.       correctly.  See the description of ----ffff    above for details.
  447.       This variable    may also be necessary in order for timestamps
  448.       on extracted files to    be set correctly.  Under Windows 95/NT
  449.       _u_n_z_i_p    should know the    correct    timezone even if TZ is unset,
  450.       assuming the timezone    is correctly set in the    Control    Panel.
  451.  
  452.      DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN
  453.       Encrypted archives are fully supported by Info-ZIP software,
  454.       but due to United States export restrictions,    the encryption
  455.       and decryption sources are not packaged with the regular
  456.  
  457.  
  458.  
  459.      Page 7                          (printed 5/6/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  467.  
  468.  
  469.  
  470.       _u_n_z_i_p    and _z_i_p    distributions.    Since the crypt    sources    were
  471.       written by Europeans,    however, they are freely available at
  472.       sites    throughout the world; see the file ``WHERE'' in    any
  473.       Info-ZIP source or binary distribution for locations both
  474.       inside and outside the US.
  475.  
  476.       Because of the separate distribution,    not all    compiled
  477.       versions of _u_n_z_i_p support decryption.     To check a version
  478.       for crypt support, either attempt to test or extract an
  479.       encrypted archive, or    else check _u_n_z_i_p's diagnostic screen
  480.       (see the ----vvvv option above) for    ``[decryption]'' as one    of the
  481.       special compilation options.
  482.  
  483.       As noted above, the ----PPPP option    may be used to supply a
  484.       password on the command line,    but at a cost in security.
  485.       The preferred    decryption method is simply to extract
  486.       normally; if a zipfile member    is encrypted, _u_n_z_i_p will
  487.       prompt for the password without echoing what is typed.
  488.       _u_n_z_i_p    continues to use the same password as long as it
  489.       appears to be    valid, by testing a 12-byte header on each
  490.       file.     The correct password will always check    out against
  491.       the header, but there    is a 1-in-256 chance that an incorrect
  492.       password will    as well.  (This    is a security feature of the
  493.       PKWARE zipfile format; it helps prevent brute-force attacks
  494.       that might otherwise gain a large speed advantage by testing
  495.       only the header.)  In    the case that an incorrect password is
  496.       given    but it passes the header test anyway, either an
  497.       incorrect CRC    will be    generated for the extracted data or
  498.       else _u_n_z_i_p will fail during the extraction because the
  499.       ``decrypted''    bytes do not constitute    a valid    compressed
  500.       data stream.
  501.  
  502.       If the first password    fails the header check on some file,
  503.       _u_n_z_i_p    will prompt for    another    password, and so on until all
  504.       files    are extracted.    If a password is not known, entering a
  505.       null password    (that is, just a carriage return or ``Enter'')
  506.       is taken as a    signal to skip all further prompting.  Only
  507.       unencrypted files in the archive(s) will thereafter be
  508.       extracted.  (In fact,    that's not quite true; older versions
  509.       of _z_i_p(1L) and _z_i_p_c_l_o_a_k(1L) allowed null passwords, so _u_n_z_i_p
  510.       checks each encrypted    file to    see if the null    password
  511.       works.  This may result in ``false positives'' and
  512.       extraction errors, as    noted above.)
  513.  
  514.       Archives encrypted with 8-bit    passwords (for example,
  515.       passwords with accented European characters) may not be
  516.       portable across systems and/or other archivers.  This
  517.       problem stems    from the use of    multiple encoding methods for
  518.       such characters, including Latin-1 (ISO 8859-1) and OEM code
  519.       page 850.  DOS _P_K_Z_I_P 2.04g uses the OEM code page; Windows
  520.       _P_K_Z_I_P    2.50 uses Latin-1 (and is therefore incompatible with
  521.       DOS _P_K_Z_I_P); Info-ZIP uses the    OEM code page on DOS, OS/2 and
  522.  
  523.  
  524.  
  525.      Page 8                          (printed 5/6/98)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  533.  
  534.  
  535.  
  536.       Win3.x ports but Latin-1 everywhere else; and    Nico Mak's
  537.       _W_i_n_Z_i_p 6.x does not allow 8-bit passwords at all.  _U_n_Z_i_p 5.3
  538.       attempts to use the default character    set first (e.g.,
  539.       Latin-1), followed by    the alternate one (e.g., OEM code
  540.       page)    to test    passwords.  On EBCDIC systems, if both of
  541.       these    fail, EBCDIC encoding will be tested as    a last resort.
  542.       (Since there are no known archivers that encrypt using
  543.       EBCDIC encoding, EBCDIC is not tested    on non-EBCDIC
  544.       systems.)  ISO character encodings other than    Latin-1    are
  545.       not supported.
  546.  
  547.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  548.       To use _u_n_z_i_p to extract all members of the archive
  549.       _l_e_t_t_e_r_s._z_i_p into the current directory and subdirectories
  550.       below    it, creating any subdirectories    as necessary:
  551.  
  552.           unzip letters
  553.  
  554.       To extract all members of _l_e_t_t_e_r_s._z_i_p    into the current
  555.       directory only:
  556.  
  557.           unzip -j letters
  558.  
  559.       To test _l_e_t_t_e_r_s._z_i_p, printing    only a summary message
  560.       indicating whether the archive is OK or not:
  561.  
  562.           unzip -tq    letters
  563.  
  564.       To test _a_l_l zipfiles in the current directory, printing only
  565.       the summaries:
  566.  
  567.           unzip -tq    \*.zip
  568.  
  569.       (The backslash before    the asterisk is    only required if the
  570.       shell    expands    wildcards, as in Unix; double quotes could
  571.       have been used instead, as in    the source examples
  572.       below.)  To extract to standard output all members of
  573.       _l_e_t_t_e_r_s._z_i_p whose names end in ._t_e_x, auto-converting to the
  574.       local    end-of-line convention and piping the output into
  575.       _m_o_r_e(1):
  576.  
  577.           unzip -ca    letters    \*.tex | more
  578.  
  579.       To extract the binary    file _p_a_p_e_r_1._d_v_i    to standard output and
  580.       pipe it to a printing    program:
  581.  
  582.           unzip -p articles    paper1.dvi | dvips
  583.  
  584.       To extract all FORTRAN and C source files--*.f, *.c, *.h,
  585.       and Makefile--into the /tmp directory:
  586.  
  587.           unzip source.zip "*.[fch]" Makefile -d /tmp
  588.  
  589.  
  590.  
  591.      Page 9                          (printed 5/6/98)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  599.  
  600.  
  601.  
  602.       (the double quotes are necessary only    in Unix    and only if
  603.       globbing is turned on).  To extract all FORTRAN and C    source
  604.       files, regardless of case (e.g., both    *.c and    *.C, and any
  605.       makefile, Makefile, MAKEFILE or similar):
  606.  
  607.           unzip -C source.zip "*.[fch]" makefile -d    /tmp
  608.  
  609.       To extract any such files but    convert    any uppercase MS-DOS
  610.       or VMS names to lowercase and    convert    the line-endings of
  611.       all of the files to the local    standard (without respect to
  612.       any files that might be marked ``binary''):
  613.  
  614.           unzip -aaCL source.zip "*.[fch]" makefile    -d /tmp
  615.  
  616.       To extract only newer    versions of the    files already in the
  617.       current directory, without querying (NOTE:  be careful of
  618.       unzipping in one timezone a zipfile created in another--ZIP
  619.       archives other than those created by Zip 2.1 or later
  620.       contain no timezone information, and a ``newer'' file    from
  621.       an eastern timezone may, in fact, be older):
  622.  
  623.           unzip -fo    sources
  624.  
  625.       To extract newer versions of the files already in the
  626.       current directory and    to create any files not    already    there
  627.       (same    caveat as previous example):
  628.  
  629.           unzip -uo    sources
  630.  
  631.       To display a diagnostic screen showing which _u_n_z_i_p and
  632.       _z_i_p_i_n_f_o options are stored in    environment variables, whether
  633.       decryption support was compiled in, the compiler with    which
  634.       _u_n_z_i_p    was compiled, etc.:
  635.  
  636.           unzip -v
  637.  
  638.       In the last five examples, assume that UNZIP or UNZIP_OPTS
  639.       is set to -q.     To do a singly    quiet listing:
  640.  
  641.           unzip -l file.zip
  642.  
  643.       To do    a doubly quiet listing:
  644.  
  645.           unzip -ql    file.zip
  646.  
  647.       (Note    that the ``.zip'' is generally not necessary.)    To do
  648.       a standard listing:
  649.  
  650.           unzip --ql file.zip
  651.       or
  652.           unzip -l-q file.zip
  653.       or
  654.  
  655.  
  656.  
  657.      Page 10                          (printed 5/6/98)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  665.  
  666.  
  667.  
  668.           unzip -l--q file.zip     (extra    minuses    don't hurt)
  669.  
  670.      TTTTIIIIPPPPSSSS
  671.       The current maintainer, being    a lazy sort, finds it very
  672.       useful to define a pair of aliases:  tt for ``unzip -tq''
  673.       and ii for ``unzip -Z'' (or ``zipinfo'').  One may then
  674.       simply type ``tt zipfile'' to    test an    archive, something
  675.       that is worth    making a habit of doing.  With luck _u_n_z_i_p will
  676.       report ``No errors detected in compressed data of
  677.       zipfile.zip,'' after which one may breathe a sigh of relief.
  678.  
  679.       The maintainer also finds it useful to set the UNZIP
  680.       environment variable to ``-aL'' and is tempted to add    ``-C''
  681.       as well.  His    ZIPINFO    variable is set    to ``-z''.
  682.  
  683.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  684.       The exit status (or error level) approximates    the exit codes
  685.       defined by PKWARE and    takes on the following values, except
  686.       under    VMS:
  687.  
  688.            0    normal; no errors or warnings detected.
  689.  
  690.            1    one    or more    warning    errors were encountered, but
  691.             processing completed successfully anyway.  This
  692.             includes zipfiles where one    or more    files was
  693.             skipped due    to unsupported compression method or
  694.             encryption with an unknown password.
  695.  
  696.            2    a generic error in the zipfile format was
  697.             detected.  Processing may have completed
  698.             successfully anyway; some broken zipfiles created
  699.             by other archivers have simple work-arounds.
  700.  
  701.            3    a severe error in the zipfile format was detected.
  702.             Processing probably    failed immediately.
  703.  
  704.            4    _u_n_z_i_p was unable to    allocate memory    for one    or
  705.             more buffers during    program    initialization.
  706.  
  707.            5    _u_n_z_i_p was unable to    allocate memory    or unable to
  708.             obtain a tty to read the decryption    password(s).
  709.  
  710.            6    _u_n_z_i_p was unable to    allocate memory    during
  711.             decompression to disk.
  712.  
  713.            7    _u_n_z_i_p was unable to    allocate memory    during in-
  714.             memory decompression.
  715.  
  716.            8    [currently not used]
  717.  
  718.            9    the    specified zipfiles were    not found.
  719.  
  720.  
  721.  
  722.  
  723.      Page 11                          (printed 5/6/98)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  731.  
  732.  
  733.  
  734.            10   invalid options were specified on the command
  735.             line.
  736.  
  737.            11   no matching    files were found.
  738.  
  739.            50   the    disk is    (or was) full during extraction.
  740.  
  741.            51   the    end of the ZIP archive was encountered
  742.             prematurely.
  743.  
  744.            80   the    user aborted _u_n_z_i_p prematurely with control-C
  745.             (or    similar)
  746.  
  747.            81   testing or extraction of one or more files failed
  748.             due    to unsupported compression methods or
  749.             unsupported    decryption.
  750.  
  751.            82   no files were found    due to bad decryption
  752.             password(s).  (If even one file is successfully
  753.             processed, however,    the exit status    is 1.)
  754.  
  755.       VMS interprets standard Unix (or PC) return values as    other,
  756.       scarier-looking things, so _u_n_z_i_p instead maps    them into
  757.       VMS-style status codes.  The current mapping is as follows:
  758.       1 (success) for normal exit, 0x7fff0001 for warning errors,
  759.       and (0x7fff000? + 16*normal_unzip_exit_status) for all other
  760.       errors, where    the `?'    is 2 (error) for _u_n_z_i_p values 2, 9-11
  761.       and 80-82, and 4 (fatal error) for the remaining ones    (3-8,
  762.       50, 51).  In addition, there is a compilation    option to
  763.       expand upon this behavior:  defining RETURN_CODES results in
  764.       a human-readable explanation of what the error status    means.
  765.  
  766.      BBBBUUUUGGGGSSSS
  767.       Multi-part archives are not yet supported, except in
  768.       conjunction with _z_i_p.     (All parts must be concatenated
  769.       together in order, and then ``zip -F'' must be performed on
  770.       the concatenated archive in order to ``fix'' it.)  This will
  771.       definitely be    corrected in the next major release.
  772.  
  773.       Archives read    from standard input are    not yet    supported,
  774.       except with _f_u_n_z_i_p (and then only the    first member of    the
  775.       archive can be extracted).
  776.  
  777.       Archives encrypted with 8-bit    passwords (e.g., passwords
  778.       with accented    European characters) may not be    portable
  779.       across systems and/or    other archivers.  See the discussion
  780.       in DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN    above.
  781.  
  782.       _u_n_z_i_p's ----MMMM (``more'')    option is overly simplistic in its
  783.       handling of screen output; as    noted above, it    fails to
  784.       detect the wrapping of long lines and    may thereby cause
  785.       lines    at the top of the screen to be scrolled    off before
  786.  
  787.  
  788.  
  789.      Page 12                          (printed 5/6/98)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  797.  
  798.  
  799.  
  800.       being    read.  _u_n_z_i_p should detect and treat each occurrence
  801.       of line-wrap as one additional line printed.    This requires
  802.       knowledge of the screen's width as well as its height.  In
  803.       addition, _u_n_z_i_p should detect    the true screen    geometry on
  804.       all systems.
  805.  
  806.       Dates, times and permissions of stored directories are not
  807.       restored except under    Unix.
  808.  
  809.       [MS-DOS] When    extracting or testing files from an archive on
  810.       a defective floppy diskette, if the ``Fail'' option is
  811.       chosen from DOS's ``Abort, Retry, Fail?'' message, older
  812.       versions of _u_n_z_i_p may    hang the system, requiring a reboot.
  813.       This problem appears to be fixed, but    control-C (or
  814.       control-Break) can still be used to terminate    _u_n_z_i_p.
  815.  
  816.       Under    DEC Ultrix, _u_n_z_i_p would    sometimes fail on long
  817.       zipfiles (bad    CRC, not always    reproducible).    This was
  818.       apparently due either    to a hardware bug (cache memory) or an
  819.       operating system bug (improper handling of page faults?).
  820.       Since    Ultrix has been    abandoned in favor of Digital Unix
  821.       (OSF/1), this    may not    be an issue anymore.
  822.  
  823.       [Unix] Unix special files such as FIFO buffers (named
  824.       pipes), block    devices    and character devices are not restored
  825.       even if they are somehow represented in the zipfile, nor are
  826.       hard-linked files relinked.  Basically the only file types
  827.       restored by _u_n_z_i_p are    regular    files, directories and
  828.       symbolic (soft) links.
  829.  
  830.       [OS/2] Extended attributes for existing directories are only
  831.       updated if the ----oooo (``overwrite all'')    option is given.  This
  832.       is a limitation of the operating system; because directories
  833.       only have a creation time associated with them, _u_n_z_i_p    has no
  834.       way to determine whether the stored attributes are newer or
  835.       older    than those on disk.  In    practice this may mean a two-
  836.       pass approach    is required:  first unpack the archive
  837.       normally (with or without freshening/updating    existing
  838.       files), then overwrite just the directory entries (e.g.,
  839.       ``unzip -o foo */'').
  840.  
  841.       [VMS]    When extracting    to another directory, only the [._f_o_o]
  842.       syntax is accepted for the ----dddd    option;    the simple Unix    _f_o_o
  843.       syntax is silently ignored (as is the    less common VMS
  844.       _f_o_o._d_i_r syntax).
  845.  
  846.       [VMS]    When the file being extracted already exists, _u_n_z_i_p's
  847.       query    only allows skipping, overwriting or renaming; there
  848.       should additionally be a choice for creating a new version
  849.       of the file.    In fact, the ``overwrite'' choice does create
  850.       a new    version; the old version is not    overwritten or
  851.       deleted.
  852.  
  853.  
  854.  
  855.      Page 13                          (printed 5/6/98)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))        IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222))))))))         UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
  863.  
  864.  
  865.  
  866.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  867.       _f_u_n_z_i_p(1L), _z_i_p(1L), _z_i_p_c_l_o_a_k(1L), _z_i_p_g_r_e_p(1L), _z_i_p_i_n_f_o(1L),
  868.       _z_i_p_n_o_t_e(1L), _z_i_p_s_p_l_i_t(1L)
  869.  
  870.      UUUURRRRLLLL
  871.       The Info-ZIP home page is currently at
  872.       http://www.cdrom.com/pub/infozip/ .
  873.  
  874.      AAAAUUUUTTTTHHHHOOOORRRRSSSS
  875.       The primary Info-ZIP authors (current    semi-active members of
  876.       the Zip-Bugs workgroup) are:    Greg ``Cave Newt'' Roelofs
  877.       (UnZip); Onno    van der    Linden (Zip); Jean-loup    Gailly
  878.       (compression); Mark Adler (decompression, fUnZip); Christian
  879.       Spieler (VMS,    MS-DOS,    Windows    95, NT,    shared code, general
  880.       Zip and UnZip    integration and    optimization); Mike White
  881.       (Windows GUI,    Windows    DLLs); Kai Uwe Rommel (OS/2); Paul
  882.       Kienitz (Amiga, Windows 95); Chris Herborth (BeOS, QNX,
  883.       Atari); Jonathan Hudson (SMS/QDOS); Sergio Monesi (Acorn
  884.       RISC OS); Harald Denker (Atari, MVS);    John Bush (Solaris,
  885.       Amiga); Hunter Goatley (VMS);    Steve Salisbury    (Windows 95,
  886.       NT); Steve Miller (Windows CE    GUI), Johnny Lee (MS-DOS,
  887.       Windows 95, NT); and Dave Smith (Tandem NSK).     The author of
  888.       the original unzip code upon which Info-ZIP's    was based is
  889.       Samuel H. Smith; Carl    Mascott    did the    first Unix port; and
  890.       David    P.  Kirschbaum organized and led Info-ZIP in its early
  891.       days with Keith Petersen hosting the original    mailing    list
  892.       at WSMR-SimTel20.  The full list of contributors to UnZip
  893.       has grown quite large; please    refer to the CONTRIBS file in
  894.       the UnZip source distribution    for a relatively complete
  895.       version.
  896.  
  897.      VVVVEEEERRRRSSSSIIIIOOOONNNNSSSS
  898.       v1.2     15 Mar    89   Samuel H. Smith
  899.       v2.0      9 Sep    89   Samuel H. Smith
  900.       v2.x     fall 1989   many Usenet contributors
  901.       v3.0      1 May    90   Info-ZIP (DPK, consolidator)
  902.       v3.1     15 Aug    90   Info-ZIP (DPK, consolidator)
  903.       v4.0      1 Dec    90   Info-ZIP (GRR, maintainer)
  904.       v4.1     12 May    91   Info-ZIP
  905.       v4.2     20 Mar    92   Info-ZIP (Zip-Bugs    subgroup, GRR)
  906.       v5.0     21 Aug    92   Info-ZIP (Zip-Bugs    subgroup, GRR)
  907.       v5.01     15 Jan    93   Info-ZIP (Zip-Bugs    subgroup, GRR)
  908.       v5.1      7 Feb    94   Info-ZIP (Zip-Bugs    subgroup, GRR)
  909.       v5.11      2 Aug    94   Info-ZIP (Zip-Bugs    subgroup, GRR)
  910.       v5.12     28 Aug    94   Info-ZIP (Zip-Bugs    subgroup, GRR)
  911.       v5.2     30 Apr    96   Info-ZIP (Zip-Bugs    subgroup, GRR)
  912.       v5.3     22 Apr    97   Info-ZIP (Zip-Bugs    subgroup, GRR)
  913.       v5.31     31 May    97   Info-ZIP (Zip-Bugs    subgroup, GRR)
  914.       v5.32      3 Nov    97   Info-ZIP (Zip-Bugs    subgroup, GRR)
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.      Page 14                          (printed 5/6/98)
  922.  
  923.  
  924.  
  925.